% @ LANGUAGE=VBScript %>
<%
Dim totalPage, totalRecords, displayRecords
msgnoAds = "
There are no ads has been submitted to this category." & msgBack & "
" msgInvalid = "Invalid request!" If session("user_logged_moderator" & strSUnique) Or session("admin_loggedin" & strSUnique) then moderator = True If session("admin_loggedin" & strSUnique) = True and Not listalpha then admin = True: cs = 6: End If If Request.Querystring.Count = 3 then subcatID = CStr(request.querystring.item(1)) catName = CStr(request.querystring.item(2)) subCatName = CStr(request.querystring.item(3)) On Error Resume Next If subCatName = "Show All" then showAllAds = True catID = subcatID Else catID = Left(subcatID, 2) & "00" catID = CLng(catID) isAll = " AND " & tablPfx & "Ads.scatID = " & subcatID End If On Error Goto 0 If not Request.Form("B1") = Empty then ID = CLng(Request.Form("ID")) If not ID = Empty then strsCat = "SELECT sortID,sCatID,CatID FROM " & tablPfx & "sCat WHERE catID = " & subcatID & " ORDER BY sortID;" rs.CursorLocation = 3 rs.CursorType = 3 rs.Open strsCat, strConn rc = rs.RecordCount On Error Resume Next For c = 1 to rc If Not rs.EOF then nextID = CLng(rs("sortID")) nextcatID = CLng(rs("sCatID")) If CStr(ID) = CStr(nextID) then Select Case Request.Form("B1") Case "↑": rs.MovePrevious Case "↓": rs.MoveNext End Select swapID = CLng(rs("sortID")) swapcatID = CLng(rs("sCatID")) Exit For End If rs.MoveNext End If Next On Error GoTo 0 rs.close If not swapID = Empty And Err.Number = 0 then objConn.Execute("UPDATE " & tablPfx & "Scat SET sortID = " & swapID & " WHERE sCatID = " & nextcatID & ";") objConn.Execute("UPDATE " & tablPfx & "Scat SET sortID = " & nextID & " WHERE sCatID = " & swapcatID & ";") Response.Redirect "viewlist.asp?" & Request.Querystring End If End If End If If Not showAllAds Then If listalpha then sortorder = "scatName": else sortorder = "sortID" strsCat = "SELECT * FROM " & tablPfx & "Scat WHERE (catID = " & CLng(subcatID) & strSelectCat & ") ORDER BY " & sortorder & ";" rs.CursorType = 3 rs.CursorLocation = 3 rs.Open strsCat, strConn If not rs.EOF then str3rdCatList = vbcrlf & "| " & vbcrlf
str3rdCatList = str3rdCatList & " | " & vbcrlf
If admin then
str3rdCatList = str3rdCatList & "" & vbcrlf If f = 1 then fd = "disabled": Else: fd = Empty: End If If f = rc then ld = "disabled" str3rdCatList = str3rdCatList & " | " End If str3rdCatList = str3rdCatList & "" & vbcrlf str3rdCatList = str3rdCatList & "" & cat3rdName & " " str3rdCatList = str3rdCatList & "(" & cat3rdAds & ") | " & vbcrlf If f mod catpos = 0 then str3rdCatList = str3rdCatList & "
| Home::Categories List::<%= catName %>::<%= subCatName %> | |||||||||||||||||
<%
If Not IsNull(full_description) AND Not Len(full_description) = 0 then
%>
" & strPaging Response.Write " Total Pages: " & totalPage & " "
%>
" Response.Write "Total Posted: " & totalRecords & "
" & msgInvalid & " " End If set rscat = objConn.Execute("SELECT " & tablPfx & "Cat.catName, " & tablPfx & "Cat.catID FROM " & tablPfx & "Cat ORDER BY catName;") Do while not rscat.EOF nextCatName = rscat("catName") nextcatID = rscat("catID") If nextCatName = catName then optCat = optCat & "" Else: optCat = optCat & "" End If rscat.MoveNext Loop rscat.close set rscat = Nothing %> |
|||||||||||||||||
| Jump to Category: |
" & msgInvalid & "
" End If %>